package org.nacos.provider.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class PageBaseDTO<E extends Serializable> implements Serializable {

    private List<E> rows;

    private long total;

    public PageBaseDTO(List<E> rows, long total) {
        this.rows = rows;
        this.total = total;
    }

    public static <T extends Serializable> PageBaseDTO<T> build(List<T> rows, long total) {
        return new PageBaseDTO<T>(rows, total);
    }

}